﻿using System;
using System.Collections.Generic;
using System.Text;

namespace _12
{
    class Vehicle
    {
        protected int wheels;
        protected double weight;


        public Vehicle( int wheels ,double weight)
        {
            this.weight = weight;
            this.wheels = wheels;

        }
    


    }
    class Car : Vehicle
    {
        protected int loader;

        public Car(int wheels, double weight,int loader) : base(wheels, weight)
        {
            this.loader = loader;
        
       
        }
        public void Car1()
        {

       Console.WriteLine("小轿车,车轮个数:{0},车重:{1}吨,限载人数:{2}人", wheels, weight, loader);
        }


    
    
    }
    class Truck : Car 
    {

        protected double payload;
        public Truck(int wheels, double weight, int loader,double payload) : base(wheels, weight, loader)
        {
            this.payload = payload;

         
        }
        public void Truch1()
        {

            Console.WriteLine("卡车,车轮个数:{0},车重:{1}吨,限载人数:{2}人,载重:{3}",wheels,weight,loader,payload);
        
        }
    
    
    }
}
